#include<stdio.h>
#include<string.h>//将此字符串从第m个开始全部复制成为另一个字符串
int main()
{
    void copy(char * ,char *,int);
    int m;
    char str1[20],str2[20];
    printf("input the string\n");
    gets(str1);
    printf("which character that begin to copy?\n");
    scanf("%d",&m);
    if(strlen(str1)<m)
        printf("input error!\n");
    else
    {
        copy(str1,str2,m);
        printf("result is %s\n",str2);
    }
    return 0;
}
void copy(char *p1,char*p2,int m)
{
    int n;
    n=0;
    while(n<m-1)
    {
        n++;
        p1++;
    }
    while (*p1!='\0')
    {
        *p2=*p1;
        p1++;
        p2++;
    }
    *p2='\0';
    
}